<link rel="stylesheet" href="../addons/jy_merch/css/mobile.css?v=1">
<div class='fui-page fui-page-current order-detail-page'>
    <div class="fui-header fui-header-success">
        <div class="fui-header-left">
            <a class="back btn-back" ng-click="goback();"></a>
        </div>
        <div class="title">订单详情</div>
        <div class="fui-header-right"></div>
    </div>
    <div class='fui-content'>
        <div class="fui-list-group result-list nomargin">
            <div class="fui-list order-status">
                <div class="fui-list-inner c">
                    <div ng-if="pagedata.item.status==1 && pagedata.item.ispay==1" class="title">
						等待卖家发货
                    </div> 
					<div ng-if="pagedata.item.ispay==0" class="title">
						等待买家付款
                    </div>					
                    <div ng-if="pagedata.item.status==2" class="title">
						等待买家收货
                    </div> 
                     <div ng-if="pagedata.item.status==3"  class="title">
						交易已完成
                    </div>   
					<div ng-if="pagedata.item.status==4"  class="title">
						交易已完成
                    </div>
                    <div class="text">订单金额(含运费): ¥ {{pagedata.item.price}}<span></span></div>
					<div ng-if="pagedata.self.out_time" class="has-address" style="color:#fff">约{{pagedata.self.out_time}}送达</div>
					<div ng-if="pagedata.item.peisong_id>0" href="tel:{{pagedata.peisong.mobile}}" class="subtitle" style="color:#fcf9b0"><i class="icon icon-peisong" style="font-size:0.65rem;color:#fcf9b0"></i>【商家配送】 配送员: {{pagedata.peisong.title || '无'}}（<i class="icon icon-phone" style="font-size:0.65rem;color:#fcf9b0"></i>{{pagedata.peisong.mobile || '无'}}）</div>
					<div ng-if="!pagedata.item.peisong_id && pagedata.peisong.opensend_type==1" class="subtitle" style="color:#fff" href="tel:{{pagedata.peisong.peisong_mobile}}"><i class="icon icon-peisong" style="font-size:0.65rem;color:#fcf9b0"></i> 【达达配送】 配送员: {{pagedata.peisong.peisong_name || '无'}}（<i class="icon icon-phone" style="font-size:0.65rem;color:#fcf9b0"></i>{{pagedata.peisong.peisong_mobile || '无'}}）</div>
					<div ng-if="pagedata.tablename" class="order-title" style="color:#fff;">线下餐桌：{{pagedata.tablename}}</div>
				</div>
                <div class="fui-list-media">
                    <i class="icon icon-money"></i>
                </div>
            </div>
        </div>
		<div style="padding:0 0.5rem">
        <div class="fui-cell-group" style="table-layout:fixed;">
            <div class="fui-cell">
                <div class="fui-cell-label">订单编号:</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark black">{{pagedata.item.ordersn}}</div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label">订单状态:</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark">
                   
                            {{pagedata.item.status_title}}
                   
                </div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label">支付状态:</div>
                <div class="fui-cell-info"></div>
               
				 {{pagedata.item.ispay==0?'未支付':'已支付'}}
            </div>
         </div>  
        <div ng-if="pagedata.item.sendtype==1" class="fui-cell-group nomargin">         
                <div class="fui-cell">
                    <div class="fui-cell-label gray">收件人: </div>
                    <div class="fui-cell-info"></div>
                    <div class="fui-cell-remark noremark black">{{pagedata.item.address.name}}</div>
                </div>
                <div class="fui-cell">
                    <div class="fui-cell-label gray">联系电话: </div>
                    <div class="fui-cell-info"></div>
                    <div class="fui-cell-remark noremark black">{{pagedata.item.address.mobile}}</div>
                </div>
                <div class="fui-cell">
                    <div class="fui-cell-label gray">收货地址: </div>
                    <div class="fui-cell-info"></div>
                    <div class="fui-cell-remark noremark black">{{pagedata.item.address.address}}</div>
                </div>
		</div>
		<div ng-if="pagedata.item.sendtype!=1" class="fui-cell-group nomargin">         
                <div class="fui-cell">
                    <div class="fui-cell-label gray">联系人: </div>
                    <div class="fui-cell-info"></div>
                    <div class="fui-cell-remark noremark black">{{pagedata.item.realname}}</div>
                </div>
                <div class="fui-cell">
                    <div class="fui-cell-label gray">联系电话: </div>
                    <div class="fui-cell-info"></div>
                    <div class="fui-cell-remark noremark black">{{pagedata.item.mobile}}</div>
                </div>
		</div>
		 <div class="fui-cell-group">
                <div ng-if="pagedata.item.remark" class="fui-cell">
                        <div class="fui-cell-label gray">留言: </div>
                        <div class="fui-cell-info text-danger newline">{{pagedata.item.remark}}</div>
                </div>
         </div>      
        <!-- 订单价格小计 -->
		<div class="fui-list-group">
			<div class="fui-list" ng-repeat="g in pagedata.item.goods"  href="javascript:" ng-click="access_json('jy_weishop/goods.detail//id='+g.id)">
						<div class="fui-list-media">
							<img ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}"/>
						</div>
						<div class="fui-list-inner">
							<div class="title"><span ng-show="g.seckill_task" class="fui-label fui-label-danger">{{g.seckill_task.tag}}</span>{{g.title}}</div>
							<div class="subtitle">{{g.selespename || '无规格'}} x {{g.total || 1}}</div>
							<div class="text"><i class="fui-tag fui-tag-red">{{g.buytypetitle || '普通'}}</i></div>
						</div>
						<div class="fui-list-angle" style="margin-right: 0">
							<div style="color: #000">￥{{g.price || '0.00'}}</div>
							<div class="num" style="text-align: right">x{{g.total || 1}}</div>
						</div>
						
			</div>
		</div>
		<div ng-if="pagedata.get_choufee.sys_peiprice>0 || pagedata.get_choufee.commission_money>0" class="fui-cell-group noborder">
				<div ng-if="pagedata.get_choufee.sys_peiprice>0" class="fui-cell">
				  <div class="fui-cell-label" style="width: auto;">扣配送费</div>
				  <div class="fui-cell-info"></div>
				  <div class="fui-cell-remark noremark">
					{{pagedata.get_choufee.sys_peiprice}}元
				  </div>
				</div>
				<div ng-if="pagedata.get_choufee.commission_money>0" class="fui-cell">
				  <div class="fui-cell-label" style="width: auto;" >平台抽成</div>
				  <div class="fui-cell-info"></div>
				  <div class="fui-cell-remark noremark">
					{{pagedata.get_choufee.commission_money}}元
					</div>
				</div>
		</div>
        <div class="fui-cell-group">
            <div class="fui-cell">
                <div class="fui-cell-label gray">商品小计</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark black">￥{{pagedata.item.goodsprice}}</div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label gray">运费</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark black">￥{{pagedata.item.dispatchprice}}</div>
            </div>
			<div class="fui-cell-group" style="table-layout:fixed;">			   
					<div class="fui-cell">
						<div class="fui-cell-label">下单时间:</div>
						<div class="fui-cell-info">{{pagedata.item.createtime}}</div>
					</div>	   
					<div ng-if="pagedata.item.ispay=='1'" class="fui-cell">
						<div class="fui-cell-label">支付时间: </div>
						<div class="fui-cell-info">{{pagedata.item.paytime}}</div>
					</div>
					<div  ng-if="pagedata.item.status>2" class="fui-cell">
						<div class="fui-cell-label">完成时间: </div>
						<div class="fui-cell-info">{{pagedata.item.finishtime}}</div>
					</div>
			   
			</div>
			<div class="fui-title center">更多信息请至PC端查看</div>
		</div>
		<div ng-if="pagedata.item.diyformdata.length>0" class="panel panel-default">
			<div class="page-header"><h4>表单信息</h4></div>
			<div class="table-responsive" class="panel-body">
					<table class="table jinyun-table table-hover vertical-middle jinyun-form">
						<thead>
							<tr>
								<th>表单标题</th>
								<th>表单内容</th>
							</tr>
						</thead>
						<tbody id="re-items">
							<tr  ng-repeat="item in pagedata.item.diyformdata">
								<td>{{item.title}}</td>
								<td>
										<span ng-if="item.type != 3 && item.type != 6 && item.type != 7 && item.type != 5" class="jylabel jylabel-f60">{{item.data}}</span>
										<span ng-if="item.type == 3" ><img data-toggle="modal" data-target="#showimage_{{$index}}" ng-src="{{tomedia(item[td.name]) || '../core/resource/images/nopic-small.jpg'}}" style="width:40px;height:40px;padding:1px;border:1px solid #ccc;"/>
										<div id="showimage_{{$index}}" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
											<div class="modal-dialog" style="max-width:880px">
												<div class="images-modal">
													<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
																<div class="mod-image" style="">
																	<img style="max-width:880px" ng-src="{{tomedia(item.data) || '../core/resource/images/nopic.jpg'}}">
																</div>
												</div>
											</div>
										</div>
										</span>
										<span ng-if="item.type == 5" class="jylabel jylabel-f60" ng-repeat="(k,v) in item[td.name] track by $index">{{v}}</span>
										<span ng-if="item.type == 6" class="">{{item.data}}</span>
										<span ng-if="item.type == 7"><span class="jylabel jylabel-f60">{{item.data.province}}</span><span class="jylabel jylabel-f60">{{item.data.city}}</span><span class="jylabel jylabel-f60">{{item.data.district}}</span></span>
								</td>
							</tr>
						</tbody>
					</table>
			</div>
		</div>
		 </div>
	</div>
</div>
